﻿using System.Web.Mvc;
using Abp.Application.Navigation;
using Abp.Runtime.Session;
using Abp.Threading;
using FutureApp.Web.Models.Layout;

namespace FutureApp.Web.Controllers
{
    public class LayoutController : FutureAppControllerBase
    {
        public IUserNavigationManager UserNavigationManager { get; set; }
               
        [ChildActionOnly]
        public PartialViewResult Sidebar(string activeMenu = "")
        {
            var model = new SidebarMenuViewModel
            {
                MainMenu = AsyncHelper.RunSync(() => this.UserNavigationManager.GetMenuAsync("MainMenu", this.AbpSession.ToUserIdentifier()))
            };
            return this.PartialView("_Sidebar", model);
        }

        [ChildActionOnly]
        public PartialViewResult QuickSidebar()
        {
            return this.PartialView("_QuickSidebar");
        }

        [ChildActionOnly]
        public PartialViewResult Main()
        {
            return this.PartialView("_Main");
        }

        [ChildActionOnly]
        public PartialViewResult Header()
        {
            return this.PartialView("_Header");
        }

        [ChildActionOnly]
        public PartialViewResult Tab()
        {
            return this.PartialView("_Tab");
        }

        [ChildActionOnly]
        public PartialViewResult Content()
        {
            return this.PartialView("_Content");
        }

        [ChildActionOnly]
        public PartialViewResult Footer()
        {

            return this.PartialView("_Footer");
        }
    }
}